#include "StdAfx.h"
#include "jin.h"
#include "machine/defendermachine.h"

static InputPort Port1 =
	{
		{
		{"Up",			I_UP,			0x01,	I_HIGH},
		{"Down",			I_DOWN,		0x02,	I_HIGH},
		{"Left",			I_LEFT,		0x04,	I_HIGH},
		{"Right",		I_RIGHT,		0x08,	I_HIGH},
		{"Start 2",		I_START2,	0x10,	I_HIGH},
		{"Start 1",		I_START1,	0x20,	I_HIGH},
		{"Button 1",	I_B1,			0x40,	I_HIGH},
		{"Button 2",	I_B2,			0x80,	I_HIGH},
		}
	};

static InputPort Port2 =
	{
		{
		{"Unknown",		0,				0x01,	I_HIGH},
		{"Unknown",		0,				0x02,	I_HIGH},
		{"Unknown",		0,				0x04,	I_HIGH},
		{"Unknown",		0,				0x08,	I_HIGH},
		{"Unknown",		0,				0x10,	I_HIGH},
		{"Unknown",		0,				0x20,	I_HIGH},
		{"Unknown",		0,				0x40,	I_HIGH},
		{"Unknown",		0,				0x80,	I_HIGH},
		}
	};

static InputPort Port3 =
	{
		{
		{"Unknown",				0,				0x01,	I_HIGH},
		{"Unknown",				0,				0x02,	I_HIGH},
		{"Unknown",				0,				0x04,	I_HIGH},
		{"Unknown",				0,				0x08,	I_HIGH},
		{"Coin 1",				I_COIN1,		0x10,	I_HIGH},
		{"Unknown",				0,				0x20,	I_HIGH},
		{"Unknown",				0,				0x40,	I_HIGH},
		{"Unknown",				0,				0x80,	I_HIGH},
		}
	};

static highscore_t highscore[] =
	{
//	{0xB260,0x60,0x00,0x48},
	{0,-1}
	};

Cjin::Cjin()
{
SetName("jin");						//set romset name
SetFlags(F_NOWATCHDOG);				//need to fix
SetScreen(304,256,ROTATE_90);
SetHighScoreInfo(highscore);
SetPort(0,&Port1);
SetPort(1,&Port2);
SetPort(2,&Port3);
AddROM("jin11.6c",	0xD000,0x1000,0xc4b9e93f,ROM_CPU1);
AddROM("jin12.7c",	0xE000,0x1000,0xa8bc9fdd,ROM_CPU1);
AddROM("jin13.6d",	0xF000,0x1000,0x79779b85,ROM_CPU1);
AddROM("jin14.4c",	0x10000,0x1000,0x6a4df97e,ROM_CPU1);
AddROM("jin15.3f",	0xF800,0x0800,0xfefd5b48,ROM_CPU2);
AddROM("jin.1a",		0x0000,0x0200,0x8dd98da5,ROM_PROM);
AddROM("jin.1l",		0x0200,0x0200,0xc3f45f70,ROM_PROM);
}

CMachine *Cjin::CreateMachine()
{
return(new CDefenderMachine());
}
